Skip to main content

screenType

Type

function

Summary

Returns the color capability of the screen.

Syntax

the screenType
screenType()

Description

Use the screenType function to determine what kind of color or grayscale values the current screen can use.

If the screenType is "StaticGray" or "StaticColor", the available colors are predefined in a color table. Any colors displayed by LiveCode are changed to the closest available color.

If the screenType is "GrayScale", "PseudoColor", or "TrueColor", a predefined number of color slots is available, and the engine can change any of those colors to one of a larger set of available colors. 8- bit color displays (256 colors) are usually PseudoColor.

If the screenType is "DirectColor", any pixel on the screen can be set to any color that the screen supports.

On some Unix systems, you can change the screenType with the -v command-line option. See the "xdpyinfo" command and the Unix documentation for more information on visual types and changing the visual type.

If the system has more than one monitor, the screenType function returns the color capability of the main screen.

The value returned by the screenType function is updated only when you start up the application. If you change the screen settings after starting up the application, you must quit and restart to update the screenType.

Examples

the screenType
if the screenType is "PseudoColor" then useLineImages else usePhotos

glossary: return, engine, pixel, bit, color table, command line, Unix, application

property: privateColors

control structure: function

function: screenRect, screenDepth, screenColors

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?